package com.example.zhihu.pojo;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Table(name = "comments")
public class Comments {
    @Id
    private String id;

    /**
     * 内容
     */
    private String comment;

    /**
     * 用户id
     */
    @Column(name = "user_id")
    private String userId;

    @Column(name = "father_comment_id")
    private String fatherCommentId;

    @Column(name = "to_user_id")
    private String toUserId;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 回答id
     */
    @Column(name = "answer_id")
    private String answerId;

    /**
     * @return id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取内容
     *
     * @return comment - 内容
     */
    public String getComment() {
        return comment;
    }

    /**
     * 设置内容
     *
     * @param comment 内容
     */
    public void setComment(String comment) {
        this.comment = comment;
    }

    /**
     * 获取用户id
     *
     * @return user_id - 用户id
     */
    public String getUserId() {
        return userId;
    }

    /**
     * 设置用户id
     *
     * @param userId 用户id
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * @return fatherCommentId
     */
    public String getFatherCommentId() {
        return fatherCommentId;
    }

    /**
     * @param fatherCommentId
     */
    public void setFatherCommentId(String fatherCommentId) {
        this.fatherCommentId = fatherCommentId;
    }

    /**
     * @return to_user_id
     */
    public String getToUserId() {
        return toUserId;
    }

    /**
     * @param toUserId
     */
    public void setToUserId(String toUserId) {
        this.toUserId = toUserId;
    }

    /**
     * 获取创建时间
     *
     * @return create_time - 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置创建时间
     *
     * @param createTime 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取回答id
     *
     * @return answer_id - 回答id
     */
    public String getAnswerId() {
        return answerId;
    }

    /**
     * 设置回答id
     *
     * @param answerId 回答id
     */
    public void setAnswerId(String answerId) {
        this.answerId = answerId;
    }
}